package com.lb.api;

/**
 * 请求状态码枚举
 *
 * @author xiemingzhi
 * @since 1.0
 */
public enum ApiResultCodeEnum implements ApiResultCode {
    SUCCESS(0, "成功"),
    ERROR(-999, "未定义错误"),
    REQUEST_PARAMETER_ERROR(-12, "无效调用参数"),

    USER_PERMISSION_DENIED(-11, "用户没有操作权限"),

    TOKEN_NOT_FOUND(-20, "没有找到Token"),
    TOKEN_ILLEGAL(-21, "非法Token"),
    TOKEN_HAS_EXPIRED(-22, "Token已经过期"),

    JPUSH_ERROR(-107, "极光返回错误"),

    USER_NOT_FOUND(-1000, "没有找到对应的用户"),
    UPDATE_USER_ERROR(-1001, "用户更新时候发生错误"),
    USER_FOUNT_ERROR(-1009, "查询用户出错"),
    USER_WAS_SUSPENDED(-1010, "当前用户已被封禁，如有疑问请联系客服"),

    CREATE_AUCTION_ROOM_ERROR(-32000,"创建拍卖房错误"),
    AUCTION_ROOM_NOT_FOUNT_ERROR(-32001,"找不到对应的拍卖房"),
    AUCTION_ROOM_IS_CLOSE(-32010,"房间已经关闭");
    ;


    private final int code;

    private final String reason;

    ApiResultCodeEnum(int code, String reason) {
        this.code = code;
        this.reason = reason;
    }

    public int getCode() {
        return code;
    }

    public String getReason() {
        return reason;
    }
}
